//
//  File.swift
//  Line
//
//  Created by admin on 2022/4/25.
//

import SwiftUI
var screen  = UIScreen.main.bounds

struct SwiftUIView: View {
    var body: some View {
        ZStack {
            Image("homeview")
                .resizable()
                .aspectRatio(contentMode: .fill)
            
//                GeometryReader { gemotry in
                    VStack(alignment: .center) {
                      Spacer()
                        Button(action: {
                            if let window = UIApplication.shared.windows.first {
                                window.rootViewController = UIHostingController(rootView: ContentView())
                                window.makeKeyAndVisible()
                            }
                        }){

                            Image("start")
                                .resizable()
                                .aspectRatio(contentMode: .fit)
                                .frame(width: screen.width / CGFloat(3), height: screen.height/3)
                                .offset( y: 10)
//                                .frame(width: gemotry.size.width/3, height: gemotry.size.height/3)
                                
                        }
                        
//                    }
                    
                 
                   
                
                }
                
               
            
         
        }
        .onAppear(){
            playAudio(forResource: "linebegin", ofType: "mp3")
        }
    }
        
        
}


struct SwiftUIView_Previews: PreviewProvider {
    static var previews: some View {
        SwiftUIView()
            .previewInterfaceOrientation(.landscapeRight)
            
    }
}
